<?php
require_once( 'db_config.inc.php' );
require_once( 'DB.php' );

$db = & DAO::CreateInstance();

//cleanup first
$sql = "truncate table ranking";
$db->Query( $sql );

$sql = "select max(id) from shop_info";
$maxid = $db->GetValue( $sql );

$types = array( "girl", "boy", "style_star", "office_lady", "student", "business_man", "shopping_expert" );

foreach( $types as $type ){
	for( $i=0;$i<200;$i++){
		$sid = rand(0,$maxid);
		$sql = "insert into ranking (shop_id, $type) value( $sid, 1 )";
		$db->Insert( $sql );
	}
}
?>
